// 该文件用于创建整个应用的路由器
// 引入Vue-Router
import VueRouter from 'vue-router'

// 创建一个路由器
import HelloWorld from '../pages/HelloWorld.vue'
import ComponentInteractApp from '../pages/ComponentInteractApp.vue'
import MultiRouter from '../pages/MultiRouter'
import MultiRouterA from '../pages/MultiRouterA'
import MultiRouterB from '../pages/MultiRouterB'
import VuexApp from '../pages/VuexApp'
import ToDoListApp from '../pages/ToDoListApp'

const router = new VueRouter({
  routes: [
    {
      path: '/helloWorld',
      component: HelloWorld
    },
    {
      path: '/cmpntInteractApp',
      component: ComponentInteractApp
    },
    {
      path: '/multiRouter',
      component: MultiRouter,
      children: [
        {
          path: 'multiRouterA',
          component: MultiRouterA
        },
        {
          path: 'multiRouterB',
          component: MultiRouterB
        }
      ]
    },
    {
      path: '/vuexApp',
      component: VuexApp
    },
    {
      path: '/toDoList',
      component: ToDoListApp
    }
  ]
});
export default router;
